<?php

namespace App\Http\Controllers\Admin;

use App\Model\Facades\AdminSettings;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

class SettingCtrl extends CommonCtrl
{
    //
    public function index()
    {
        $data['info'] = AdminSettings::create()->toSettingArray();
        return $this->responseView('index', $data);
    }

    public function renovate()
    {
        $query = AdminSettings::create()->save();
        $query ? $this->success('操作成功') : $this->error('操作失败');
    }
}
